<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>

selection_test(
  '<div contenteditable dir="ltr">|<span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">a|bc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  '43-0 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">|abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">a|bc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  '43-1 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">a|bc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">ab|c\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  '43-2 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">ab|c\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc|\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  '43-3 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc|\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7|\u05E7\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  '43-4 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7|\u05E7\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7|\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  '43-5 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7|\u05E7123\u05E0\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7|123\u05E0\u05E0\u05E0def</span></div>',
  '43-6 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7|123\u05E0\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E71|23\u05E0\u05E0\u05E0def</span></div>',
  '43-7 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E71|23\u05E0\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E712|3\u05E0\u05E0\u05E0def</span></div>',
  '43-8 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E712|3\u05E0\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123|\u05E0\u05E0\u05E0def</span></div>',
  '43-9 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123|\u05E0\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0|\u05E0\u05E0def</span></div>',
  '43-10 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0|\u05E0\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0|\u05E0def</span></div>',
  '43-11 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0|\u05E0def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0|def</span></div>',
  '43-12 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0|def</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0d|ef</span></div>',
  '43-13 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0d|ef</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0de|f</span></div>',
  '43-14 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0de|f</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def|</span></div>',
  '43-15 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def|</span></div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def|</span></div>',
  '43-16 ltr right character');

selection_test(
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def</span>|</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="ltr"><span dir="rtl">abc\u05E7\u05E7\u05E7123\u05E0\u05E0\u05E0def</span>|</div>',
  '43-17 ltr right character');
</script>
